layui.define(['jquery'], function (exports) {
    var $ = layui.jquery;
    var obj = {
        ajaxPost: function (url, data, callback) {
            $.ajax({
                url: url,
                data: data,
                method: 'post',
                dataType: 'JSON',
                contentType: "application/json;charset=UTF-8",
                success: callback
            });
        },

        ajaxGet: function (url, callback) {
            $.ajax({
                url: url,
                method: 'get',
                dataType: 'JSON',
                contentType: "application/json;charset=UTF-8",
                success: callback
            });
        }
    };
    //输出接口
    exports('common', obj);
});